package com.define.ssh.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;

/**
 * Company entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "compcode")
public class Company implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;
	private String compcode;
	private String compname;
	private String logo;
	private Date establishTime;
	private String products;
	private String local;
	private String legal;
	private Date regTime;
	private Date updateTime;
	private Integer updatetype;
	private String notes;

	// private Set<Compdept> compdepts = new HashSet<Compdept>(0);

	// Constructors

	/** default constructor */
	public Company() {
	}

	// Property accessors
	@GeneratedValue(generator = "generator")
	@Id
	@GenericGenerator(name = "generator", strategy = "identity")
	@Column(name = "id", unique = true, nullable = false, precision = 20, scale = 0)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "compcode", unique = true, nullable = false, insertable = true, updatable = true, length = 10)
	public String getCompcode() {
		return this.compcode;
	}

	public void setCompcode(String compcode) {
		this.compcode = compcode;
	}

	@Column(name = "compname", unique = false, nullable = false, insertable = true, updatable = true, length = 50)
	public String getCompname() {
		return this.compname;
	}

	public void setCompname(String compname) {
		this.compname = compname;
	}

	@Column(name = "logo", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public String getLogo() {
		return this.logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "establish_time", unique = false, nullable = false, insertable = true, updatable = true, length = 10)
	public Date getEstablishTime() {
		return this.establishTime;
	}

	public void setEstablishTime(Date establishTime) {
		this.establishTime = establishTime;
	}

	@Column(name = "products", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public String getProducts() {
		return this.products;
	}

	public void setProducts(String products) {
		this.products = products;
	}

	@Column(name = "local", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public String getLocal() {
		return this.local;
	}

	public void setLocal(String local) {
		this.local = local;
	}

	@Column(name = "legal", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public String getLegal() {
		return this.legal;
	}

	public void setLegal(String legal) {
		this.legal = legal;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "reg_time", unique = false, nullable = false, insertable = true, updatable = true, length = 19)
	public Date getRegTime() {
		return this.regTime;
	}

	public void setRegTime(Date regTime) {
		this.regTime = regTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "update_time", unique = false, nullable = false, insertable = true, updatable = true, length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "updatetype", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getUpdatetype() {
		return this.updatetype;
	}

	public void setUpdatetype(Integer updatetype) {
		this.updatetype = updatetype;
	}

	@Column(name = "notes", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public String getNotes() {
		return this.notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}
	/*
	 * @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY,
	 * mappedBy = "company") public Set<Compdept> getCompdepts() { return
	 * this.compdepts; }
	 * 
	 * public void setCompdepts(Set<Compdept> compdepts) { this.compdepts =
	 * compdepts; }
	 */

}